package com.example.demo.feign;

import com.example.demo.fallback.StorageServiceFallbackFactory;
import com.example.demo.web.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "storage-service", fallbackFactory = StorageServiceFallbackFactory.class)
public interface StorageService {

    @GetMapping(path = "/storage/{commodityCode}/{count}")
    AjaxResult storage(@PathVariable("commodityCode") String commodityCode,
                       @PathVariable("count") int count);

}
